/* bar_style.css */
#navigation_bar_on_the_page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* 显式定义高度 */
    background-color: #2E5AAC;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 0;
    height: 100vh; /* 关键：确保 body 高度为视口高度 */
    overflow: hidden; /* 禁止全局滚动 */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 增强文字对比度 */
#name h1,
.nav-links a {
    color: #F0F0F0;  /* 珍珠白替代纯白 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 添加文字阴影增强可读性 */
}

#name h1 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
      line-height: 60px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;  /* 导航项间距（假设每个导航项宽度为3rem）*/
    padding: 0;
    margin: 0;
}

li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
}

li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}


/* 容器统一布局 */
.nav-container {
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px; /* 确保容器高度与导航栏一致 */
}

/* 标题区域 */
#name {
    display: flex;
    align-items: center; /* 与导航项文字基线对齐 */
    margin-right: 2rem;  /* 与导航项保持间距 */
}

/* 导航链接统一基线 */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center; /* 与标题垂直对齐 */
}

/* 链接文字垂直居中 */
.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
     line-height: 60px; 
    transition: background-color 0.3s;
}

/* bar_style.css */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}